<?php
    // 这里是添加分类接口

    include_once '../../fn.php';

    $name = $_GET['name'];
    $slug = $_GET['slug'];

    // 构建数据库执行串
    $sql = "insert INTO categories (slug,name) VALUES('$slug','$name');";

    $result = my_exec($sql);

    echo json_encode($result);

?>